import Vue from 'vue'
import App from './App.vue'
import router from './router'

//在开发环境中是否打印控制台错误信息
Vue.config.productionTip = false

//导入面包屑导航组件注册成全局组件
import breadcrumb from "./components/Breadcrumb"
Vue.component("breadcrumb",breadcrumb)


//引入全局默认样式
import "./assets/css/reset.css"
//引入全局字体样式
import "./assets/fonts/iconfont.css"
//使用elementUi组件
// import './plugins/element.js'

//引入富文本编辑器
import VueQuillEditor from 'vue-quill-editor'

// require styles
// import 'quill/dist/quill.core.css'
// import 'quill/dist/quill.snow.css'
// import 'quill/dist/quill.bubble.css'

//使用富文本编辑器
Vue.use(VueQuillEditor)

//全局过滤器  Vue.filter("过滤器名称", (val)=>{})
Vue.filter("dateFormat", (val)=>{ //val要过滤的原始数据
    let date = new Date(val*1000);
    let y = date.getFullYear();
    let m = date.getMonth() + 1;
    let d = date.getDate();
    let hh = date.getHours();
    let mm = date.getMinutes();
    let ss = date.getSeconds();
    return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
});

//引入全局http模块
import http from "./http/request"
Vue.prototype.$http = http;

//全局事件总线
Vue.prototype.$bus = new Vue();

//全局工具函数
import utils from "./utils"
Vue.prototype.$utils = utils;

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
